package com.example.mapper;

import com.example.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {
    @Insert("insert into user (username,password)"+" values(#{username},#{password})")
    int insertUser(User user);

    @Select("select username,password from user where username=#{username}")
    List<User> selectUserByName(@Param("username") String username);
}
